package com.young.security.service.impl;

import com.young.security.entity.LoginUser;
import com.young.security.service.SecurityFrameworkService;
import org.springframework.lang.Nullable;

import static com.young.security.utils.SecurityFrameworkUtils.getLoginUser;

/**
 * @Author mouyang
 * @Date 2023/09/22 11:44
 **/
public class SecurityFrameworkServiceImpl implements SecurityFrameworkService {
    @Override
    public boolean hasPermission(String permission) {
        return false;
    }

    @Nullable
    public static Long getLoginUserId() {
        LoginUser loginUser = getLoginUser();
        return loginUser != null ? loginUser.getId() : null;
    }
}
